package com.liuwei.spring.cloud.framework.db.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

/**
 * @author : BaseIdEntity
 * @version V1.0
 * @date: 2023/5/12 9:37 上午
 * @Description: TODO
 */
@Data
public class BaseIdEntity {

    @TableId(type = IdType.ASSIGN_ID)
    //@TableId(type = IdType.AUTO)
    private String id;

    @TableLogic
    @TableField(value="is_del",fill = FieldFill.INSERT)
    private Boolean deleted;

    @TableField(value="create_time",fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value="create_by_id",fill = FieldFill.INSERT)
    private String createById;

    @TableField(value="create_by_name",fill = FieldFill.INSERT)
    private String createByName;

    @TableField(value="update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(value="update_by_id",fill = FieldFill.INSERT_UPDATE)
    private String updateById;

    @TableField(value="update_by_name",fill = FieldFill.INSERT_UPDATE)
    private String updateByName;
}
